#include <iostream>
class Singleton
{
public:
    static Singleton *instance()
    {
        static Singleton s;
        return &s;
    }
    ~Singleton()
    {
        std::cout << "析构\n";
    }

private:
    Singleton()
    {
        std::cout << "构造\n";
    }
};
int main()
{
    Singleton *s1 = Singleton::instance();
    Singleton *s2 = Singleton::instance();
    Singleton *s3 = Singleton::instance();
    /*为什么地址一样*/
    std::cout << s1 << " " << s2 << " " << s3 << std::endl;
    return 0;
}